From 73a27a3cee2b2e3a4735b3639e305e95ece681c4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 3 Oct 2005 15:07:35 +0000 Subject: [PATCH] Use a 1k buffer for sniffing image formats, instead of 128 or 256 bytes. 2005-10-03 Matthias Clasen * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): * gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): * gdk-pixbuf-loader.c: Use a 1k buffer for sniffing image formats, instead of 128 or 256 bytes. (#317225, Sebastien Bacher, Dom Lachowicz) --- gdk-pixbuf/ChangeLog | 8 ++++++++ gdk-pixbuf/gdk-pixbuf-animation.c | 2 +- gdk-pixbuf/gdk-pixbuf-io.c | 2 +- gdk-pixbuf/gdk-pixbuf-loader.c | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 780ea49a1f..41b8b79467 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,11 @@ +2005-10-03 Matthias Clasen + + * gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file): + * gdk-pixbuf-io.c (gdk_pixbuf_new_from_file): + * gdk-pixbuf-loader.c: Use a 1k buffer for sniffing image formats, + instead of 128 or 256 bytes. (#317225, Sebastien Bacher, + Dom Lachowicz) + 2005-09-05 Matthias Clasen * io-tga.c (parse_rle_data): Remove unused variable diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c index ad510bf2cd..ad7e76fc9c 100644 --- a/gdk-pixbuf/gdk-pixbuf-animation.c +++ b/gdk-pixbuf/gdk-pixbuf-animation.c @@ -136,7 +136,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename, GdkPixbufAnimation *animation; int size; FILE *f; - guchar buffer [128]; + guchar buffer [1024]; GdkPixbufModule *image_module; gchar *display_name; gboolean locked = FALSE; diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index 56dfefe627..ea7894bfea 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -840,7 +840,7 @@ gdk_pixbuf_new_from_file (const char *filename, GdkPixbuf *pixbuf; int size; FILE *f; - guchar buffer[256]; + guchar buffer[1024]; GdkPixbufModule *image_module; gchar *display_name; diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c index 6f9d6461a3..78689e58eb 100644 --- a/gdk-pixbuf/gdk-pixbuf-loader.c +++ b/gdk-pixbuf/gdk-pixbuf-loader.c @@ -52,7 +52,7 @@ static guint pixbuf_loader_signals[LAST_SIGNAL] = { 0 }; /* Internal data */ -#define LOADER_HEADER_SIZE 128 +#define LOADER_HEADER_SIZE 1024 typedef struct { -- 2.30.2